home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_06_07 / v6n7051a.txt < prev    next >
Text File  |  1989-09-26  |  834b  |  20 lines

  1.  
  2.                   Example 1:  C-SPRITE Macro Language
  3.  
  4.  1      def example1 {
  5.  2         .count = 0
  6.  3         roff
  7.  4         while (.count < #0) {                ; test against 1st parameter
  8.  5            g .symcmp+11, .xcexit             ; break at .xcexit
  9.  6            if (ip == .xcexit) {              ; are we at the end?
  10.  7               g                              ; yes, let program finish
  11.  8               break;                         ; ...and stop the loop
  12.  9               }
  13. 10            .count++
  14. 11            if (.count == 0t10) continue      ; return to top of loop
  15. 12            echo This is the 10th iteration
  16. 13            ds [.p] .l1                       ; display two strings only
  17. 14            ds [.#1] .l1                      ; on the 10th iteration...
  18. 15            }
  19. 16         }
  20.